package com.shxy.cloudclassroom.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shxy.cloudclassroom.entity.pojo.User;
import com.sun.istack.NotNull;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserMapper extends BaseMapper<User> {


    /**
     * 根据用户ID更新管理员角色
     * @param userId 用户ID
     */
    @Update("UPDATE tb_user SET role = 'ordinaryAdmin' WHERE id = #{userId}")
    void updateAdminById(@NotNull Long userId);
}
